package day08.Ti.SetJieKou;

import java.util.Comparator;
import java.util.Iterator;
import java.util.Scanner;
import java.util.TreeSet;

public class Ti04 {
    public static void main(String[] args) {
        TreeSet<String>ts=new TreeSet<>(new Comparator<String>() {
            @Override
            public int compare(String o1, String o2) {
                return 1;
            }
        });
        Scanner sc=new Scanner(System.in);
        int count=1;
        while (true){
            System.out.println("请输入第"+count+"个字符串");
            String s = sc.next();
            count++;
            if ("quit".equals(s)){
                break;

            }else {
                ts.add(s);
            }

        }
        System.out.println(ts);
    }
}
